package com.itrip.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.itrip.entity.ItripUser;
import com.itrip.dao.ItripUserMapper;
import com.itrip.service.ItripUserService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Service
public class ItripUserServiceImpl extends ServiceImpl<ItripUserMapper, ItripUser> implements ItripUserService{

 private static final Logger LOGGER = LoggerFactory.getLogger(ItripUserServiceImpl.class);


 @Override
 public ItripUser login(String userCode) {
  ItripUserMapper mapper = getBaseMapper();
  QueryWrapper<ItripUser> qw = Wrappers.query();
  qw.eq("userCode", userCode);
  return mapper.selectOne(qw);
 }
}
